home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / buttons / selvb20 / seknobs.frm < prev    next >
Text File  |  1995-06-15  |  11KB  |  391 lines

  1. VERSION 2.00
  2. Begin Form KnobDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Knob Demo"
  6.    ClientHeight    =   4725
  7.    ClientLeft      =   2070
  8.    ClientTop       =   2685
  9.    ClientWidth     =   7500
  10.    Height          =   5130
  11.    Left            =   2010
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4725
  17.    ScaleWidth      =   7500
  18.    Top             =   2340
  19.    Width           =   7620
  20.    Begin SELECTOR Selector1 
  21.       Angle           =   210
  22.       AutoAlign       =   -1  'True
  23.       AutoAngle       =   -1  'True
  24.       AutoOffset      =   -1  'True
  25.       AutoOffsetDistance=   0
  26.       AutoOffsetStyle =   0  ' 0 - Circular 
  27.       AutoRadius      =   0.8
  28.       AutoStartAngle  =   210
  29.       AutoStopAngle   =   330
  30.       BackgroundColor =   &H00C0C0C0&
  31.       BevelInner      =   1  ' 1 - Raised
  32.       BevelOuter      =   2  ' 2 - Inset
  33.       BevelWidth      =   2
  34.       BorderType      =   1  ' 1 - Bevel
  35.       BorderWidth     =   2
  36.       Captions        =   SEKNOBS.FRX:0000
  37.       FrameColor      =   &H00000000&
  38.       FrameScaleX     =   0
  39.       FrameScaleY     =   0
  40.       FrameStyle      =   0  ' 0 - None
  41.       Height          =   3465
  42.       Highlight       =   0   'False
  43.       HighlightColor  =   &H00000000&
  44.       KnobColor       =   &H00808080&
  45.       KnobOriginX     =   0
  46.       KnobOriginY     =   0
  47.       KnobRadius      =   0.6
  48.       KnobStyle       =   2  ' 2 - Complex
  49.       KnobUserDefined =   "0,1000,  200,800,  150,700,  500,-600,  0,-500,  -500,-600,  -150,700,  -200,800"
  50.       Left            =   150
  51.       LineDisplay     =   0   'False
  52.       LineInnerRadius =   0.4
  53.       LineThickness   =   1
  54.       MarkUserDefined =   ""
  55.       MouseControl    =   -1  'True
  56.       OutlineAlign    =   0  ' 0 - Left 
  57.       OutlineColor    =   &H00000000&
  58.       OutlineTitle    =   ""
  59.       OutlineWidth    =   0
  60.       Radius          =   0
  61.       TabIndex        =   2
  62.       Top             =   180
  63.       Value           =   0
  64.       Width           =   3495
  65.       XScale          =   0
  66.       YScale          =   0
  67.    End
  68.    Begin CheckBox Check1 
  69.       BackColor       =   &H00C0C0C0&
  70.       Caption         =   "MouseControl"
  71.       Height          =   225
  72.       Left            =   3990
  73.       TabIndex        =   6
  74.       Top             =   2190
  75.       Width           =   1635
  76.    End
  77.    Begin TextBox Text1 
  78.       Height          =   585
  79.       Left            =   135
  80.       MultiLine       =   -1  'True
  81.       TabIndex        =   8
  82.       Text            =   "0,1000,  200,800,  150,700,  500,-600,  0,-500,  -500,-600,  -150,700,  -200,800"
  83.       Top             =   3975
  84.       Width           =   7275
  85.    End
  86.    Begin Frame Frame4 
  87.       BackColor       =   &H00C0C0C0&
  88.       Caption         =   "Knob Color"
  89.       Height          =   1275
  90.       Left            =   5790
  91.       TabIndex        =   18
  92.       Top             =   90
  93.       Width           =   1605
  94.       Begin Label HColors 
  95.          BackColor       =   &H00000000&
  96.          Height          =   225
  97.          Index           =   0
  98.          Left            =   450
  99.          TabIndex        =   0
  100.          Top             =   360
  101.          Width           =   225
  102.       End
  103.       Begin Label HColors 
  104.          BackColor       =   &H00808080&
  105.          Height          =   225
  106.          Index           =   5
  107.          Left            =   930
  108.          TabIndex        =   9
  109.          Top             =   570
  110.          Width           =   225
  111.       End
  112.       Begin Label HColors 
  113.          BackColor       =   &H00FFFFFF&
  114.          Height          =   225
  115.          Index           =   1
  116.          Left            =   690
  117.          TabIndex        =   7
  118.          Top             =   360
  119.          Width           =   225
  120.       End
  121.       Begin Label HColors 
  122.          BackColor       =   &H000000FF&
  123.          Height          =   225
  124.          Index           =   6
  125.          Left            =   450
  126.          TabIndex        =   26
  127.          Top             =   780
  128.          Width           =   225
  129.       End
  130.       Begin Label HColors 
  131.          BackColor       =   &H0000FF00&
  132.          Height          =   225
  133.          Index           =   2
  134.          Left            =   930
  135.          TabIndex        =   25
  136.          Top             =   360
  137.          Width           =   225
  138.       End
  139.       Begin Label HColors 
  140.          BackColor       =   &H0000FFFF&
  141.          Height          =   225
  142.          Index           =   7
  143.          Left            =   690
  144.          TabIndex        =   24
  145.          Top             =   780
  146.          Width           =   225
  147.       End
  148.       Begin Label HColors 
  149.          BackColor       =   &H00FF0000&
  150.          Height          =   225
  151.          Index           =   3
  152.          Left            =   450
  153.          TabIndex        =   23
  154.          Top             =   570
  155.          Width           =   225
  156.       End
  157.       Begin Label HColors 
  158.          BackColor       =   &H00FF00FF&
  159.          Height          =   225
  160.          Index           =   8
  161.          Left            =   930
  162.          TabIndex        =   22
  163.          Top             =   780
  164.          Width           =   225
  165.       End
  166.       Begin Label HColors 
  167.          BackColor       =   &H000080FF&
  168.          Height          =   225
  169.          Index           =   4
  170.          Left            =   690
  171.          TabIndex        =   21
  172.          Top             =   570
  173.          Width           =   225
  174.       End
  175.    End
  176.    Begin HScrollBar HScroll1 
  177.       Height          =   225
  178.       Index           =   3
  179.       Left            =   3990
  180.       Max             =   100
  181.       TabIndex        =   14
  182.       Top             =   1800
  183.       Width           =   3405
  184.    End
  185.    Begin Frame Frame2 
  186.       BackColor       =   &H00C0C0C0&
  187.       Caption         =   "Knob Style"
  188.       Height          =   1275
  189.       Left            =   4020
  190.       TabIndex        =   10
  191.       Top             =   90
  192.       Width           =   1605
  193.       Begin OptionButton Option2 
  194.          BackColor       =   &H00C0C0C0&
  195.          Caption         =   "User"
  196.          Height          =   225
  197.          Index           =   3
  198.          Left            =   210
  199.          TabIndex        =   5
  200.          Top             =   900
  201.          Width           =   1005
  202.       End
  203.       Begin OptionButton Option2 
  204.          BackColor       =   &H00C0C0C0&
  205.          Caption         =   "Complex"
  206.          Height          =   225
  207.          Index           =   2
  208.          Left            =   210
  209.          TabIndex        =   4
  210.          Top             =   690
  211.          Width           =   1005
  212.       End
  213.       Begin OptionButton Option2 
  214.          BackColor       =   &H00C0C0C0&
  215.          Caption         =   "Pointer"
  216.          Height          =   225
  217.          Index           =   1
  218.          Left            =   210
  219.          TabIndex        =   12
  220.          Top             =   480
  221.          Width           =   1095
  222.       End
  223.       Begin OptionButton Option2 
  224.          BackColor       =   &H00C0C0C0&
  225.          Caption         =   "Circle"
  226.          Height          =   225
  227.          Index           =   0
  228.          Left            =   210
  229.          TabIndex        =   11
  230.          Top             =   270
  231.          Width           =   1125
  232.       End
  233.    End
  234.    Begin Label Label1 
  235.       AutoSize        =   -1  'True
  236.       BackStyle       =   0  'Transparent
  237.       Caption         =   "Knob Shape: (x,y pair list)"
  238.       Height          =   195
  239.       Index           =   4
  240.       Left            =   120
  241.       TabIndex        =   20
  242.       Top             =   3720
  243.       Width           =   2205
  244.    End
  245.    Begin Label Label2 
  246.       Alignment       =   2  'Center
  247.       AutoSize        =   -1  'True
  248.       BackStyle       =   0  'Transparent
  249.       Caption         =   " "
  250.       Height          =   195
  251.       Index           =   5
  252.       Left            =   1890
  253.       TabIndex        =   1
  254.       Top             =   3450
  255.       Width           =   120
  256.    End
  257.    Begin Label Label2 
  258.       Alignment       =   2  'Center
  259.       AutoSize        =   -1  'True
  260.       BackStyle       =   0  'Transparent
  261.       Caption         =   " "
  262.       Height          =   195
  263.       Index           =   4
  264.       Left            =   1950
  265.       TabIndex        =   17
  266.       Top             =   3840
  267.       Width           =   90
  268.    End
  269.    Begin Label Label1 
  270.       AutoSize        =   -1  'True
  271.       BackStyle       =   0  'Transparent
  272.       Caption         =   "Knob Radius"
  273.       Height          =   195
  274.       Index           =   3
  275.       Left            =   3990
  276.       TabIndex        =   16
  277.       Top             =   1560
  278.       Width           =   1095
  279.    End
  280.    Begin Label Label2 
  281.       Alignment       =   2  'Center
  282.       AutoSize        =   -1  'True
  283.       BackStyle       =   0  'Transparent
  284.       Caption         =   " "
  285.       Height          =   195
  286.       Index           =   3
  287.       Left            =   1860
  288.       TabIndex        =   13
  289.       Top             =   3450
  290.       Width           =   210
  291.    End
  292.    Begin Label Label2 
  293.       Alignment       =   2  'Center
  294.       AutoSize        =   -1  'True
  295.       BackStyle       =   0  'Transparent
  296.       Caption         =   " "
  297.       Height          =   195
  298.       Index           =   2
  299.       Left            =   5880
  300.       TabIndex        =   15
  301.       Top             =   2250
  302.       Width           =   120
  303.    End
  304.    Begin Label Label2 
  305.       Alignment       =   2  'Center
  306.       AutoSize        =   -1  'True
  307.       BackStyle       =   0  'Transparent
  308.       Caption         =   " "
  309.       Height          =   195
  310.       Index           =   1
  311.       Left            =   5865
  312.       TabIndex        =   3
  313.       Top             =   1830
  314.       Width           =   120
  315.    End
  316.    Begin Label Label2 
  317.       Alignment       =   2  'Center
  318.       AutoSize        =   -1  'True
  319.       BackStyle       =   0  'Transparent
  320.       Caption         =   " "
  321.       Height          =   195
  322.       Index           =   0
  323.       Left            =   5865
  324.       TabIndex        =   19
  325.       Top             =   1410
  326.       Width           =   90
  327.    End
  328. End
  329.  
  330. Sub Check1_Click ()
  331.  
  332.     selector1.MouseControl = check1
  333.  
  334. End Sub
  335.  
  336. Sub Form_Load ()
  337.  
  338.     hscroll1(3) = selector1.KnobRadius * 100
  339.     
  340.     check1 = -selector1.MouseControl
  341.     
  342.     option2(selector1.KnobStyle) = True
  343.     text1 = selector1.KnobUserDefined
  344.  
  345. End Sub
  346.  
  347. Sub HColors_Click (index As Integer)
  348.  
  349.     selector1.KnobColor = HColors(index).BackColor
  350.  
  351. End Sub
  352.  
  353. Sub HScroll1_Change (index As Integer)
  354.  
  355.     Select Case index
  356.         Case 0
  357.         Case 1
  358.         Case 2
  359.         Case 3
  360.             selector1.KnobRadius = hscroll1(3) / 100
  361.             label2(3) = hscroll1(3) / 100
  362.     End Select
  363.  
  364. End Sub
  365.  
  366. Sub HScroll1_Scroll (index As Integer)
  367.  
  368.     Select Case index
  369.         Case 0
  370.         Case 1
  371.         Case 2
  372.         Case 3
  373.             selector1.KnobRadius = hscroll1(3) / 100
  374.             label2(3) = hscroll1(3)
  375.     End Select
  376.  
  377. End Sub
  378.  
  379. Sub Option2_Click (index As Integer)
  380.  
  381.     selector1.KnobStyle = index
  382.  
  383. End Sub
  384.  
  385. Sub Text1_Change ()
  386.     
  387.     selector1.KnobUserDefined = text1
  388.  
  389. End Sub
  390.  
  391.